//
//@File    :	14.9_worktest.cpp
//@Time    :	2022/01/20 20:43:15
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	test wrker class hierarchy
//

#include <iostream>
#include "14.7_Worker0.h"
const int LIM=4;
int main()
{
    Waiter bob("Bob Apple",314L,5);
    Singer bev("Beverly Hills",522L,3);
    Waiter w_temp;
    Singer s_temp;

    Worker *pw[LIM] = {&bob,&bev,&w_temp,&s_temp};

    int i;
    for ( i = 0; i < LIM; i++)
    {
        pw[i]->Set();
    }
    for ( i = 0; i < LIM; i++)
    {
        pw[i]->Show();
        std::cout<<std::endl;
    }
    
    system("pause");
    return 0;
}